<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="<?php echo base_url()?>common/css/public.css" rel="stylesheet" />
    <link href="<?php echo base_url()?>common/css/login.css" rel="stylesheet" />
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/layer/layer.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.Msg.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.form.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.validate.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.metadata.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.validate.messages_cn.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/validate.js"></script>

    <script type="text/javascript">
        $(function () {
            //刷新验证码
            $("#vali_img").click(function () {
                document.getElementById("vali_img").src = "<?php echo site_url('admin/login/get_vali_img');?>"+"?id="+new Date().getTime();//获得验证码
            });
        });
        $(function () {
            $("#ajax_form").ajaxForm(function (data) {
                var jsonData = $.parseJSON(data);
                if (jsonData.Statu == 'ok') {
                    $.Success(jsonData)
                }
                else {
                    $.Success(jsonData)
                }
            });
        });
        
    </script>
</head>
<body>
    <div class="loginBox">
        <form id="ajax_form" method="post" action="<?php echo site_url('admin/login/DoLogin')?>" >
            <div class="login_data">
                <div class="login_input">
                    <span>用户名</span>
                    <input name="user_account" type="text" value="<?php echo set_value('uname')?>" />
                </div>
                <div class="login_input">
                    <span>用户名</span>
                    <input  name="user_pass" type="password" value="<?php echo set_value('upass')?>" />
                </div>
                <input class="login_sub" type="submit" value="" />
                <div class="login_input">
                    <span>验证码</span>
                    <input type="text" id="vali" name="vali" />
                    <img id="vali_img" src="<?php echo site_url('admin/login/get_vali_img');?>" alt=""  style="cursor: pointer;position:absolute;right:28px;bottom:35px;" title="看不清？点击更换另一个验证码。" />  
                </div>
               
            </div>
          
        </form>
    </div>
  
</body>
</html>